package com.xujianlun.cpms.controller.sys;

import cn.hutool.http.HttpUtil;
import com.xujianlun.cpms.config.AuthAccess;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @Author xujianlun
 * @Date 2022/11/21 14:02
 * @注释  数据接口
 */
@RestController
@RequestMapping("/echarts")
public class EchartsController {

    @AuthAccess
    @GetMapping("/list")
    public String chinaData(){
        //疫情接口数据 中国近30天新增加数据统计
        return HttpUtil.get("https://api.inews.qq.com/newsqa/v1/query/inner/publish/modules/list?modules=chinaDayListNew,chinaDayAddListNew&limit=30");
    }
    @AuthAccess
    @GetMapping("/toDayList")
    public String toDayList(){
        //疫情接口数据 世界近最新数据统计
        return HttpUtil.get("https://c.m.163.com/ug/api/wuhan/app/data/list-total?t=333839752040");
    }
}
